home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 201 / DPCS1104.ISO / Full / QuickBooks / QBTutor / Lesson5 / Lesson5.dcr / 00009_Invoice parts positioning.ls < prev    next >
Encoding:
Text File  |  2001-02-01  |  1.1 KB  |  32 lines

  1. property spriteNum, pProductX, pProductY, pProX, pProY, pServiceX, pServiceY
  2. global InvoiceFormTemplate
  3.  
  4. on getPropertyDescriptionList
  5.   description = [:]
  6.   addProp(description, #pProductX, [#default: 0, #format: #number, #comment: "Product X:"])
  7.   addProp(description, #pProductY, [#default: 0, #format: #number, #comment: "Product Y:"])
  8.   addProp(description, #pProX, [#default: 0, #format: #number, #comment: "Pro X:"])
  9.   addProp(description, #pProY, [#default: 0, #format: #number, #comment: "Pro Y:"])
  10.   addProp(description, #pServiceX, [#default: 0, #format: #number, #comment: "Service X:"])
  11.   addProp(description, #pServiceY, [#default: 0, #format: #number, #comment: "Service Y:"])
  12.   return description
  13. end
  14.  
  15. on beginSprite me
  16.   checkTemplateType()
  17. end
  18.  
  19. on checkTemplateType me
  20.   case InvoiceFormTemplate of
  21.     "Product Invoice":
  22.       sprite(spriteNum).locH = pProductX
  23.       sprite(spriteNum).locV = pProductY
  24.     "Professional Invoice":
  25.       sprite(spriteNum).locH = pProX
  26.       sprite(spriteNum).locV = pProY
  27.     otherwise:
  28.       sprite(spriteNum).locH = pServiceX
  29.       sprite(spriteNum).locV = pServiceY
  30.   end case
  31. end
  32.